package summer.student.Utils;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @program: emotion
 * @description:
 * @author: hlt
 * @create: 2023-06-20 18:53
 **/
@Data
@AllArgsConstructor
public class Result {
    private Integer status;
    private String msg;
    private Object data;


    // 将封装的信息返回出去
    static public summer.student.Utils.Result Success(Object data){
        return new Result(200, "success", data);
    }
    static public summer.student.Utils.Result Error(Object data){
        return new Result(400, "error", data);
    }
    static public summer.student.Utils.Result Error500(Object data){
        return new Result(500, "error", data);
    }
    static public summer.student.Utils.Result ErrorWithSpecialMsg(String msg,Object data){
        return new Result(400, msg, data);
    }
}
